home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ für Kids
/
C++ for kids.iso
/
Buch
/
Hallo6a.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1998-12-28
|
3KB
|
82 lines
//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop
#include "Hallo6a.h"
//---------------------------------------------------------------------------
#pragma resource "*.dfm"
TForm1 *Form1;
char *Diagnose;
char *Titel;
bool Wahl[3];
String Bereich[3];
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
String Text = "Diagnose";
for (int Nr=0; Nr<3; Nr++)
if (Wahl[Nr]) Text = Text + Bereich[Nr];
Titel = Text.c_str();
Application->MessageBox (Diagnose, Titel, 4+64);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
Bereich[0] = " fⁿr Seele ";
Bereich[1] = " fⁿr Geist ";
Bereich[2] = " fⁿr K÷rper ";
for (int Nr=0; Nr<3; Nr++) Wahl[Nr] = false;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::CheckBox1Click(TObject *Sender)
{
Wahl[0] = CheckBox1->Checked;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::CheckBox2Click(TObject *Sender)
{
Wahl[1] = CheckBox2->Checked;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::CheckBox3Click(TObject *Sender)
{
Wahl[2] = CheckBox3->Checked;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::RadioButton1Click(TObject *Sender)
{
Diagnose = "Das ist ja toll!";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::RadioButton2Click(TObject *Sender)
{
Diagnose ="Das freut mich!";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::RadioButton3Click(TObject *Sender)
{
Diagnose ="Das geht ja noch!";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::RadioButton4Click(TObject *Sender)
{
Diagnose ="Das tut mir leid!";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::RadioButton5Click(TObject *Sender)
{
Diagnose ="Das ist ja schlimm!";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::RadioButton6Click(TObject *Sender)
{
Diagnose ="Wenn du meinst...";
}
//---------------------------------------------------------------------------